/**
 * 
 */
package cultu.xml.bind;

import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;

import javax.xml.bind.DatatypeConverter;

/**
 * @author pmuseur
 * 
 */
public class DateTimeAdapter
{
    public static Date parseDateTime(String s)
    {
        return DatatypeConverter.parseDateTime(s).getTime();
    }

    public static String printDateTime(Date dt)
    {
        Calendar cal = new GregorianCalendar();
        cal.setTime(dt);
        return DatatypeConverter.printDateTime(cal);
    }
}
